package org.electronic.registration.service;

import org.electronic.registration.bo.Patient;
import org.electronic.registration.dao.PatientDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * User: Egor
 * Date: 12.01.12
 */
@Service("patientService")
public class PatientServiceImpl implements PatientService {

    @Autowired
    PatientDao patientDao;

    @Override
    public void save(Patient patient) {
        patientDao.save(patient);
    }

    @Override
    public Patient getPatientByName(String name) {
        return patientDao.getPatientByName(name);
    }

    @Override
    public List<Patient> getAllPatients() {
        return patientDao.getAllPatients();
    }

    @Override
    public Patient isPatientExist(String email, String password) {
        return patientDao.isPatientExist(email, password);
    }
}
